package com.newasia.management.dto.productSku;

import com.newasia.commons.result.AbstractRequest;
import com.newasia.commons.tool.exception.ValidateException;
import com.newasia.management.constants.ManagementRetCode;
import lombok.Data;

import java.util.List;

@Data
public class ShelvesSpuListRequest extends AbstractRequest {

    private Integer status;
    private List<Long> spuIds;

    @Override
    public void requestCheck() {
        if (spuIds.size()<1||status==null||"".equals(status)){
            throw new ValidateException(
                    ManagementRetCode.REQUISITE_PARAMETER_NOT_EXIST.getCode(),
                    ManagementRetCode.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }
    }
}
